package com.cloud.pole.shop.biz.goods;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Options;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear;
import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.mapper.goods.ShopGoodsModelAttrMapper;
import com.cloud.pole.shop.model.entity.goods.ShopGoodsModelAttr;

/**
 * ${DESCRIPTION}
 *
 * @author wanghaobin
 * @create 2017-06-08 16:23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ShopGoodsModelAttrBiz extends BaseBiz<ShopGoodsModelAttrMapper, ShopGoodsModelAttr> {

	public List<ShopGoodsModelAttr> selectBy(Integer shopId) {
		return mapper.selectAlle(shopId);
	}

	
	public void addGoodsModel(ShopGoodsModelAttr shopGoodsModelAttr) {
		mapper.addGoodsModelBy(shopGoodsModelAttr);
	}
	
	public ShopGoodsModelAttr selectByValName(String name,Integer shopId) {
		return mapper.selectByAttrValueName(name,shopId);
	}
	
	public ShopGoodsModelAttr selectByVal(String modelAttrName,Integer shopId) {
		return mapper.selectByAttrValEs(modelAttrName,shopId);
	}
}
